import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
def send(to,sbj,ms):
    msg=MIMEMultipart()
    msg["Subject"]=sbj
    msg.attach(MIMEText(ms,'html', 'UTF-8'))
    gmail_user = 'r.isubilov@craftmobile.ru'
    gmail_pwd = '******'
    smtpserver = smtplib.SMTP_SSL("mail.craftmobile.ru",25)
    smtpserver.ehlo()
    #smtpserver.starttls()
    smtpserver.ehlo
    smtpserver.login(gmail_user, gmail_pwd)
    header = 'To:' + to + '\n' + 'From: isubilov <r.isubilov@craftmobile.ru>\n'
    msg = header + msg.as_string()
    smtpserver.sendmail(gmail_user, to, msg)
    print('done!')
    smtpserver.close()
